Free GC strings when releasing waypoint.
authorrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Sat, 24 Jul 2004 22:47:29 +0000 (22:47 +0000)
committerrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Sat, 24 Jul 2004 22:47:29 +0000 (22:47 +0000)
gpsbabel/waypt.c

index f5f2323a8310424160b9e42069b0d6e0b15f889f..04acd2ec1f7d556d520ebffd5d6d46ded70e6f31 100644 (file)
@@ -243,6 +243,12 @@ waypt_free( waypoint *wpt )
        if (wpt->gpx_extras) {
                free_gpx_extras(wpt->gpx_extras);
        }
+       if (wpt->gc_data.desc_short.utfstring) {
+               xfree(wpt->gc_data.desc_short.utfstring);
+       }
+       if (wpt->gc_data.desc_long.utfstring) {
+               xfree(wpt->gc_data.desc_long.utfstring);
+       }
        xfree(wpt);     
 }